from rest_framework.routers import DefaultRouter

from . import views

urlpatterns = []

# 实例化路由对象
route = DefaultRouter()
# 注册路由:register(self, prefix, viewset, base_name=None)
route.register(r'areas', views.AreasViewSet, base_name='areas')

# 添加到路由中
urlpatterns += route.urls
